<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!doctype html>
<html lang="en">
<head>
  <link rel="stylesheet" href="${ctx}/statics/css/manage.css">
  <title>用户管理</title>
</head>
<body>

<section class="settings-wrap">
  <div class="table-wrap">
    <table id="account-list" lay-filter="account-list"></table>
  </div>
  <div class="operate-btns">
    <button class="layui-btn layui-btn-primary layui-btn-lg addBtn"><i class="layui-icon layui-icon-addition"></i>新增</button>
    <button class="layui-btn layui-btn-primary layui-btn-lg editBtn"><i class="layui-icon layui-icon-edit"></i>编辑</button>
    <button class="layui-btn layui-btn-primary layui-btn-lg delBtn"><i class="layui-icon layui-icon-delete"></i>删除</button>
  </div>
</section>

<!--toolbar-->
<script type="text/html" id="toolbar">
  <button class="layui-btn getCheckData" lay-event="getCheckData">获取选中行数据</button>
</script>

<%--新增弹窗--%>
<script type="text/html" id="add-tpl">
  <form class="layui-form add-param" lay-filter="add-param" action="#">
    <div class="layui-form-item">
      <label class="layui-form-label">用户名</label>
      <div class="layui-input-inline">
        <input type="text" class="layui-input" name="loginName" placeholder="请输入用户名">
      </div>
    </div>
    <div class="layui-form-item">
      <label class="layui-form-label">密码</label>
      <div class="layui-input-inline">
        <input type="password" class="layui-input" name="passWord" placeholder="请输入密码">
      </div>
    </div>
    <div class="layui-form-item">
      <label class="layui-form-label">联系电话</label>
      <div class="layui-input-inline">
        <input type="text" class="layui-input" name="phoneNo" placeholder="请输入联系电话">
      </div>
    </div>
    <div class="layui-form-item">
      <label class="layui-form-label">权限</label>
      <div class="layui-input-inline auth-option-wrap">
        <select name="auths" xm-select="select-auth" class="multi-meter authority"
                xm-select-skin="normal" xm-select-height="38px"></select>
      </div>
    </div>
    <div class="layui-form-item">
      <div class="fr">
        <button class="layui-btn layui-btn-sm" lay-submit lay-filter="add-param">确定</button>
        <button type="cancel" class="layui-btn layui-btn-sm layui-btn-primary">取消</button>
      </div>
    </div>
  </form>
</script>
<%--编辑弹窗--%>
<script type="text/html" id="edit-tpl">
  <form class="layui-form edit-param" lay-filter="edit-param" action="#">
    <div class="layui-form-item">
      <label class="layui-form-label">用户名</label>
      <div class="layui-input-inline">
        <input type="text" class="layui-input edit-usn" name="loginName" placeholder="请输入用户名" disabled>
      </div>
    </div>
    <div class="layui-form-item">
      <label class="layui-form-label">密码</label>
      <div class="layui-input-inline">
        <input type="password" class="layui-input" name="passWord" placeholder="请输入密码">
      </div>
    </div>
    <div class="layui-form-item">
      <label class="layui-form-label">联系电话</label>
      <div class="layui-input-inline">
        <input type="text" class="layui-input" name="phoneNo" placeholder="请输入联系电话">
      </div>
    </div>
    <div class="layui-form-item">
      <label class="layui-form-label">权限</label>
      <div class="layui-input-inline auth-option-wrap">
        <select name="auths" xm-select="select-auth" class="multi-meter authority"
                xm-select-skin="normal" xm-select-height="38px"></select>
      </div>
    </div>
    <div class="layui-form-item">
      <div class="fr">
        <button class="layui-btn layui-btn-sm" lay-submit lay-filter="edit-param">确定</button>
        <button type="cancel" class="layui-btn layui-btn-sm layui-btn-primary">取消</button>
      </div>
    </div>
  </form>
</script>

<script type="text/html" id="auth-tpl">
  <option value="">请选择权限</option>
  {{#  layui.each(d, function(index, item){ }}
  <option value="{{ item.authCode }}">{{ item.authName }}</option>
  {{#  }); }}
</script>
<script src="${ctx}/statics/js/usermanage.js"></script>
</body>
</html>
